#!/bin/bash

echo '=================================== Downloading code... ==================================='

# create directory
mkdir -p ~/workspace/code

# change directory
cd ~/workspace/code

# Download day-day-up
git clone git@gitee.com:yulu86/day-day-up.git
cd day-day-up
git remote add upstream git@github.com:yulu86/day-day-up.git
git fetch --all
echo '=================================== Clone day-day-up success! ==================================='
cd ..

# Download docker-collection
git clone git@gitee.com:yulu86/docker-collection.git
cd docker-collection
git remote add upstream git@github.com:yulu86/docker-collection.git && \
git fetch --all
echo '=================================== Clone docker-collection success! ==================================='
cd ..

# Download lego-play
cd ~/workspace
git clone git@gitee.com:yulu86/lego-play.git
cd lego-play
git remote add upstream git@github.com:yulu86/lego-play.git
git fetch --all
echo '=================================== Clone lego-play success! ==================================='

# Download flutter
cd ~/workspace/tool
git clone https://github.com/flutter/flutter.git -b stable
echo '=================================== Clone flutter success! ==================================='

echo '=================================== Download code success! ==================================='